import request from '@/utils/request'

// 注册
export function register(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 登入验证
export function login(data) {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/users/me'
  })
}

// 获取用户权限
export function getUserRoles() {
  return request({
    url: '/mypermissions'
  })
}
